import { IsString } from "class-validator";
import { BaseEntity } from "../BaseEntity";
import { Model } from "sequelize";

export default class CodeGenerationEntity extends BaseEntity {
  id?: number;

  @IsString()
  public moduleName: string;

  @IsString()
  public fields: string;

  @IsString()
  public superDir: string;

  @IsString()
  public relationFile: string;

  @IsString()
  public tableName: string;

  public static transform(plainObject: object): CodeGenerationEntity {
    return super.baseTransform(CodeGenerationEntity, plainObject);
  }
}

export interface ICodeGenerationModel extends Model<CodeGenerationEntity> {}
